package com.ruoyi.project.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.YqgItemInventoryMapper;
import com.ruoyi.project.domain.YqgItemInventory;
import com.ruoyi.project.service.IYqgItemInventoryService;

/**
 * 商品库存Service业务层处理
 * 
 * @author dr
 * @date 2023-05-28
 */
@Service
public class YqgItemInventoryServiceImpl implements IYqgItemInventoryService 
{
    @Autowired
    private YqgItemInventoryMapper yqgItemInventoryMapper;

    /**
     * 查询商品库存
     * 
     * @param id 商品库存主键
     * @return 商品库存
     */
    @Override
    public YqgItemInventory selectYqgItemInventoryById(Long id)
    {
        return yqgItemInventoryMapper.selectYqgItemInventoryById(id);
    }

    /**
     * 查询商品库存列表
     * 
     * @param yqgItemInventory 商品库存
     * @return 商品库存
     */
    @Override
    public List<YqgItemInventory> selectYqgItemInventoryList(YqgItemInventory yqgItemInventory)
    {
        return yqgItemInventoryMapper.selectYqgItemInventoryList(yqgItemInventory);
    }

    /**
     * 新增商品库存
     * 
     * @param yqgItemInventory 商品库存
     * @return 结果
     */
    @Override
    public int insertYqgItemInventory(YqgItemInventory yqgItemInventory)
    {
        return yqgItemInventoryMapper.insertYqgItemInventory(yqgItemInventory);
    }

    /**
     * 修改商品库存
     * 
     * @param yqgItemInventory 商品库存
     * @return 结果
     */
    @Override
    public int updateYqgItemInventory(YqgItemInventory yqgItemInventory)
    {
        return yqgItemInventoryMapper.updateYqgItemInventory(yqgItemInventory);
    }

    /**
     * 批量删除商品库存
     * 
     * @param ids 需要删除的商品库存主键
     * @return 结果
     */
    @Override
    public int deleteYqgItemInventoryByIds(Long[] ids)
    {
        return yqgItemInventoryMapper.deleteYqgItemInventoryByIds(ids);
    }

    /**
     * 删除商品库存信息
     * 
     * @param id 商品库存主键
     * @return 结果
     */
    @Override
    public int deleteYqgItemInventoryById(Long id)
    {
        return yqgItemInventoryMapper.deleteYqgItemInventoryById(id);
    }
}
